//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#include "../RuntimeException.h"

using namespace Native::System;

void CRuntimeException::Check(C_SCENE& scene, FValidate Validate, WSTRING& arguments, WSTRING& detail) throw()
{
    wstring message;

    if (!Validate(message)) {
        throw CRuntimeException(scene, message, arguments, detail);
    }
}

CRuntimeException::CRuntimeException()
{
}

CRuntimeException::CRuntimeException(C_RUNTIME_EXCEPTION& that) :
    CException(that)
{
}

CRuntimeException::CRuntimeException(C_RUNTIME_EXCEPTION&& that) :
    CException(that)
{
}

CRuntimeException::CRuntimeException(C_SCENE& scene, WSTRING& message, WSTRING& arguments, WSTRING& detail)
{
    Append(CCase(scene, message, arguments, detail));
}